package com.bblocks.common.anti_reptile.rule;

import com.bblocks.common.anti_reptile.config.bean.RuleComm;
import com.bblocks.common.anti_reptile.module.MatchResult;
import com.bblocks.common.anti_reptile.service.NoticeService;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <p>Project: bb-anti-reptile - AbstractResultStrategy</p>
 * <p>描述：</p>
 *
 * @Author Zhao [125043150@qq.com]
 * @Date 2024/4/16 9:31
 * @Version 1.0
 * @since 8
 */
@Slf4j
public abstract class AbstractResultStrategy implements ResultStrategy{



    public void process(@NonNull MatchResult matchResult, HttpServletRequest request, HttpServletResponse response) throws IOException{
        this.doProcess(matchResult.getMatchRule(), request, response);
    }

    public abstract void doProcess(@NonNull RuleComm ruleComm, HttpServletRequest request, HttpServletResponse response) throws IOException;

}
